package com.cn.common.enums;

public enum PayChannelCodeEnum {

    PINGAN("001001","平安银行"),
    CZ("002001","浙商银行"),
    MY("003001","网商银行");

    String code;
    String name;

    PayChannelCodeEnum(String code,String name){
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName(){
        return name;
    }

    public static String getNameByCode(String code) {
        for (PayChannelCodeEnum channelEnum : PayChannelCodeEnum.values()) {
            if (channelEnum.getCode().equals(code)) {
                return channelEnum.getName();
            }
        }
        return "";
    }
}
